home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ultra Pack
/
UltraComputing Partner Applications.iso
/
SunLabs
/
tclTK
/
src
/
tcl7.4p3.patch
< prev
next >
Wrap
Text File
|
1995-11-27
|
16KB
|
570 lines
Prereq: "7.4p2"
*** ../tcl7.4p2/patchlevel.h Mon Sep 18 11:41:25 1995
--- patchlevel.h Mon Nov 27 08:57:48 1995
***************
*** 17,23 ****
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
! * @(#) patchlevel.h 1.11 95/09/18 11:41:22
*/
! #define TCL_PATCH_LEVEL "7.4p2"
--- 17,23 ----
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
! * @(#) patchlevel.h 1.12 95/11/27 08:57:52
*/
! #define TCL_PATCH_LEVEL "7.4p3"
*** ../tcl7.4p2/./tclCkalloc.c Mon Jun 19 10:33:12 1995
--- ./tclCkalloc.c Wed Sep 20 16:43:25 1995
***************
*** 14,20 ****
*
*/
! static char sccsid[] = "@(#) tclCkalloc.c 1.9 95/06/19 10:33:11";
#include "tclInt.h"
--- 14,20 ----
*
*/
! static char sccsid[] = "@(#) tclCkalloc.c 1.10 95/09/20 16:43:24";
#include "tclInt.h"
***************
*** 393,399 ****
* even though BODY_OFFSET is in words on these machines).
*/
! struct mem_header *memp = (struct mem_header *) \
(((unsigned long) ptr) - BODY_OFFSET);
if (alloc_tracing)
--- 393,399 ----
* even though BODY_OFFSET is in words on these machines).
*/
! struct mem_header *memp = (struct mem_header *)
(((unsigned long) ptr) - BODY_OFFSET);
if (alloc_tracing)
***************
*** 459,465 ****
* line.
*/
! struct mem_header *memp = (struct mem_header *) \
(((unsigned long) ptr) - BODY_OFFSET);
copySize = size;
--- 459,465 ----
* line.
*/
! struct mem_header *memp = (struct mem_header *)
(((unsigned long) ptr) - BODY_OFFSET);
copySize = size;
*** ../tcl7.4p2/./tclCmdAH.c Fri May 5 09:29:51 1995
--- ./tclCmdAH.c Wed Sep 27 11:11:26 1995
***************
*** 12,18 ****
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
! static char sccsid[] = "@(#) tclCmdAH.c 1.98 95/05/05 09:29:51";
#include "tclInt.h"
#include "tclPort.h"
--- 12,18 ----
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
! static char sccsid[] = "@(#) tclCmdAH.c 1.99 95/09/27 11:11:24";
#include "tclInt.h"
#include "tclPort.h"
***************
*** 775,780 ****
--- 775,791 ----
}
argIndex++;
format++;
+ }
+ if (width > 1000) {
+ /*
+ * Don't allow arbitrarily large widths: could cause core
+ * dump when we try to allocate a zillion bytes of memory
+ * below.
+ */
+
+ width = 1000;
+ } else if (width < 0) {
+ width = 0;
}
if (width != 0) {
sprintf(newPtr, "%d", width);
*** ../tcl7.4p2/./tclMain.c Thu Jun 8 10:55:57 1995
--- ./tclMain.c Wed Sep 27 15:32:02 1995
***************
*** 11,17 ****
*/
#ifndef lint
! static char sccsid[] = "@(#) tclMain.c 1.21 95/06/08 10:55:55";
#endif
#include <stdio.h>
--- 11,17 ----
*/
#ifndef lint
! static char sccsid[] = "@(#) tclMain.c 1.22 95/09/27 15:32:01";
#endif
#include <stdio.h>
***************
*** 230,236 ****
if (code != TCL_OK) {
fprintf(stderr, "%s\n", interp->result);
} else if (tty && (*interp->result != 0)) {
! printf("%s\n", interp->result);
}
#ifdef TCL_MEM_DEBUG
if (quitFlag) {
--- 230,242 ----
if (code != TCL_OK) {
fprintf(stderr, "%s\n", interp->result);
} else if (tty && (*interp->result != 0)) {
! /*
! * Important: use puts and not printf here. On Solaris 2.3
! * and 2.4, and perhaps other systems, printf will dump core
! * if interp->result is big.
! */
!
! puts(interp->result);
}
#ifdef TCL_MEM_DEBUG
if (quitFlag) {
*** ../tcl7.4p2/./tclUnixAZ.c Thu Jun 29 14:22:40 1995
--- ./tclUnixAZ.c Fri Nov 17 15:40:14 1995
***************
*** 14,20 ****
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
! static char sccsid[] = "@(#) tclUnixAZ.c 1.85 95/06/29 14:22:37";
#include "tclInt.h"
#include "tclPort.h"
--- 14,20 ----
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
! static char sccsid[] = "@(#) tclUnixAZ.c 1.87 95/11/17 15:40:14";
#include "tclInt.h"
#include "tclPort.h"
***************
*** 783,804 ****
{
char string[30];
! sprintf(string, "%ld", statPtr->st_dev);
if (Tcl_SetVar2(interp, varName, "dev", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", statPtr->st_ino);
if (Tcl_SetVar2(interp, varName, "ino", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", statPtr->st_mode);
if (Tcl_SetVar2(interp, varName, "mode", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", statPtr->st_nlink);
if (Tcl_SetVar2(interp, varName, "nlink", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
--- 783,804 ----
{
char string[30];
! sprintf(string, "%ld", (long) statPtr->st_dev);
if (Tcl_SetVar2(interp, varName, "dev", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", (long) statPtr->st_ino);
if (Tcl_SetVar2(interp, varName, "ino", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", (long) statPtr->st_mode);
if (Tcl_SetVar2(interp, varName, "mode", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", (long) statPtr->st_nlink);
if (Tcl_SetVar2(interp, varName, "nlink", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
***************
*** 813,834 ****
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", statPtr->st_size);
if (Tcl_SetVar2(interp, varName, "size", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", statPtr->st_atime);
if (Tcl_SetVar2(interp, varName, "atime", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", statPtr->st_mtime);
if (Tcl_SetVar2(interp, varName, "mtime", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", statPtr->st_ctime);
if (Tcl_SetVar2(interp, varName, "ctime", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
--- 813,834 ----
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", (long) statPtr->st_size);
if (Tcl_SetVar2(interp, varName, "size", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", (long) statPtr->st_atime);
if (Tcl_SetVar2(interp, varName, "atime", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", (long) statPtr->st_mtime);
if (Tcl_SetVar2(interp, varName, "mtime", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", (long) statPtr->st_ctime);
if (Tcl_SetVar2(interp, varName, "ctime", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
***************
*** 1806,1812 ****
{
int count, i, result;
double timePer;
! #if NO_GETTOD
struct tms dummy2;
long start, stop;
#else
--- 1806,1812 ----
{
int count, i, result;
double timePer;
! #ifdef NO_GETTOD
struct tms dummy2;
long start, stop;
#else
***************
*** 1826,1832 ****
" command ?count?\"", (char *) NULL);
return TCL_ERROR;
}
! #if NO_GETTOD
start = times(&dummy2);
#else
gettimeofday(&start, &tz);
--- 1826,1832 ----
" command ?count?\"", (char *) NULL);
return TCL_ERROR;
}
! #ifdef NO_GETTOD
start = times(&dummy2);
#else
gettimeofday(&start, &tz);
***************
*** 1843,1849 ****
return result;
}
}
! #if NO_GETTOD
stop = times(&dummy2);
timePer = (((double) (stop - start))*1000000.0)/CLK_TCK;
#else
--- 1843,1849 ----
return result;
}
}
! #ifdef NO_GETTOD
stop = times(&dummy2);
timePer = (((double) (stop - start))*1000000.0)/CLK_TCK;
#else
***************
*** 1892,1898 ****
* newline. */
{
int result = TCL_OK;
! int i, pid, length, abnormalExit;
WAIT_STATUS_TYPE waitStatus;
char *msg;
--- 1892,1898 ----
* newline. */
{
int result = TCL_OK;
! int i, pid, length, abnormalExit, anyErrorInfo;
WAIT_STATUS_TYPE waitStatus;
char *msg;
***************
*** 1964,1969 ****
--- 1964,1970 ----
* string.
*/
+ anyErrorInfo = 0;
if (errorId >= 0) {
while (1) {
# define BUFFER_SIZE 1000
***************
*** 1984,1989 ****
--- 1985,1991 ----
}
buffer[count] = 0;
Tcl_AppendResult(interp, buffer, (char *) NULL);
+ anyErrorInfo = 1;
}
close(errorId);
}
***************
*** 1993,1999 ****
* at all, generate an error message here.
*/
! if (abnormalExit && (*interp->result == 0)) {
Tcl_AppendResult(interp, "child process exited abnormally",
(char *) NULL);
}
--- 1995,2001 ----
* at all, generate an error message here.
*/
! if (abnormalExit && !anyErrorInfo) {
Tcl_AppendResult(interp, "child process exited abnormally",
(char *) NULL);
}
*** ../tcl7.4p2/./tclUnixStr.c Thu Jun 29 08:21:26 1995
--- ./tclUnixStr.c Fri Nov 3 10:59:34 1995
***************
*** 13,19 ****
*/
#ifndef lint
! static char sccsid[] = "@(#) tclUnixStr.c 1.24 95/06/29 08:21:25";
#endif /* not lint */
#include "tclInt.h"
--- 13,19 ----
*/
#ifndef lint
! static char sccsid[] = "@(#) tclUnixStr.c 1.25 95/11/03 10:59:35";
#endif /* not lint */
#include "tclInt.h"
***************
*** 215,221 ****
#ifdef ELNRNG
case ELNRNG: return "ELNRNG";
#endif
! #ifdef ELOOP
case ELOOP: return "ELOOP";
#endif
#ifdef EMFILE
--- 215,221 ----
#ifdef ELNRNG
case ELNRNG: return "ELNRNG";
#endif
! #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT))
case ELOOP: return "ELOOP";
#endif
#ifdef EMFILE
*** ../tcl7.4p2/./tclUnixUtil.c Mon Aug 28 08:57:36 1995
--- ./tclUnixUtil.c Mon Nov 13 14:17:46 1995
***************
*** 16,22 ****
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
! static char sccsid[] = "@(#) tclUnixUtil.c 1.57 95/08/28 08:57:37";
#include "tclInt.h"
#include "tclPort.h"
--- 16,22 ----
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
! static char sccsid[] = "@(#) tclUnixUtil.c 1.58 95/11/13 14:17:50";
#include "tclInt.h"
#include "tclPort.h"
***************
*** 218,224 ****
int status, result;
for (detPtr = detList, prevPtr = NULL; detPtr != NULL; ) {
! result = waitpid(detPtr->pid, &status, WNOHANG);
if ((result == 0) || ((result == -1) && (errno != ECHILD))) {
prevPtr = detPtr;
detPtr = detPtr->nextPtr;
--- 218,224 ----
int status, result;
for (detPtr = detList, prevPtr = NULL; detPtr != NULL; ) {
! result = (int) waitpid((pid_t) detPtr->pid, &status, WNOHANG);
if ((result == 0) || ((result == -1) && (errno != ECHILD))) {
prevPtr = detPtr;
detPtr = detPtr->nextPtr;
***************
*** 1427,1433 ****
{
int result;
while (1) {
! result = waitpid(pid, statPtr, options);
if ((result != -1) || (errno != EINTR)) {
return result;
}
--- 1427,1433 ----
{
int result;
while (1) {
! result = (int) waitpid((pid_t) pid, statPtr, options);
if ((result != -1) || (errno != EINTR)) {
return result;
}
*** ../tcl7.4p2/./changes Mon Sep 18 11:04:09 1995
--- ./changes Mon Nov 27 08:57:58 1995
***************
*** 1,6 ****
Recent user-visible changes to Tcl:
! sccsid = @(#) changes 1.16 95/09/18 11:04:07
1. No more [command1] [command2] construct for grouping multiple
commands on a single command line.
--- 1,6 ----
Recent user-visible changes to Tcl:
! sccsid = @(#) changes 1.17 95/11/27 08:58:02
1. No more [command1] [command2] construct for grouping multiple
commands on a single command line.
***************
*** 1245,1251 ****
8/4/95 (bug fix) C-level trace callbacks for variables were sometimes
receiving the PART1_NOT_PARSED flag, which could cause errors in
! subsequent Tcl library calls using the flags.
8/4/95 (bug fix) Calls to toupper and tolower weren't using the
UCHAR macros, which caused trouble in non-U.S. locales. (JO)
--- 1245,1251 ----
8/4/95 (bug fix) C-level trace callbacks for variables were sometimes
receiving the PART1_NOT_PARSED flag, which could cause errors in
! subsequent Tcl library calls using the flags. (JO)
8/4/95 (bug fix) Calls to toupper and tolower weren't using the
UCHAR macros, which caused trouble in non-U.S. locales. (JO)
***************
*** 1252,1260 ****
8/25/95 (bug fix) Undid change from 7/19, so that commands can stay
around while their deletion callbacks execute. Added lots of code to
! handle all of the reentrancy problems that this opens up.
8/28/95 (bug fix) Exec wasn't handling bad user names properly, as
! in "exec ~bogus_user/foo".
----------------- Released patch 7.4p2, 9/19/95 -----------------------
--- 1252,1273 ----
8/25/95 (bug fix) Undid change from 7/19, so that commands can stay
around while their deletion callbacks execute. Added lots of code to
! handle all of the reentrancy problems that this opens up. (JO)
8/28/95 (bug fix) Exec wasn't handling bad user names properly, as
! in "exec ~bogus_user/foo". (JO)
----------------- Released patch 7.4p2, 9/19/95 -----------------------
+
+ 9/27/95 (bug fix) The "format" command didn't check for huge or negative
+ width specifiers, which could cause core dumps. (JO)
+
+ 9/27/95 (bug fix) Core dumps could occur if an interactive command typed
+ to tclsh returned a very long result for tclsh to print out. The bug is
+ actually in printf (in Solaris 2.3 and 2.4, at least); switched to use
+ puts instead. (JO)
+
+ 10/1/95 (bug fix) "exec" command wasn't always generating the
+ "child process exited abnormally" message when it should have. (JO)
+
+ ----------------- Released patch 7.4p3, 12/28/95 -----------------------
*** ../tcl7.4p2/./tests/lsort.test Mon Jun 5 17:00:02 1995
--- ./tests/lsort.test Mon Oct 30 08:03:20 1995
***************
*** 10,16 ****
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
! # @(#) lsort.test 1.6 95/06/05 17:00:02
if {[string compare test [info procs test]] == 1} then {source defs}
--- 10,16 ----
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
! # @(#) lsort.test 1.7 95/10/30 08:03:22
if {[string compare test [info procs test]] == 1} then {source defs}
***************
*** 122,134 ****
} {1 {bad switch "-in": must be -ascii, -integer, -real, -increasing -decreasing, or -command}}
test lsort-5.5 {lsort errors: disallow recursion} {
proc x args {lsort {a b c}}
! list [catch {lsort -command x {3 7}} msg] $msg $errorInfo
! } {1 {can't invoke "lsort" recursively} {can't invoke "lsort" recursively
! while executing
! "lsort {a b c}"
! (procedure "x" line 1)
! invoked from within
! "x 3 7"
! (user-defined comparison command)
! invoked from within
! "lsort -command x {3 7}"}}
--- 122,126 ----
} {1 {bad switch "-in": must be -ascii, -integer, -real, -increasing -decreasing, or -command}}
test lsort-5.5 {lsort errors: disallow recursion} {
proc x args {lsort {a b c}}
! list [catch {lsort -command x {3 7}} msg] $msg
! } {1 {can't invoke "lsort" recursively}}